﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewUser.ascx.cs" Inherits="VCN.admin.UC.ViewUser" %>
<link href="/admin/Style/General.css"  rel="stylesheet" type="text/css" />
<span class="lblheader">QUẢN LÝ NGƯỜI DÙNG </span>
         <table style="width: 100%">
        <tr>
            <td style="width:18%">
                <span style="font-weight: bold; color: #3399CC">Username:</span>
            </td>
            <td>
                <asp:TextBox runat="server" Width="40%" ID="txtusername" 
                CssClass="txtright"></asp:TextBox>
                &nbsp;&nbsp;<asp:RequiredFieldValidator ID="rquField" runat="server" 
                ControlToValidate="txtusername" ErrorMessage="Chưa nhập UserName">
                </asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                <span style="font-weight: bold; color: #3399CC">Password:</span>
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtpassword" Width="40%"
                TextMode="Password" CssClass="txtright"></asp:TextBox>
                &nbsp;&nbsp;<asp:RequiredFieldValidator ID="rqPass" runat="server" 
                ControlToValidate="txtpassword" ErrorMessage="Chưa nhập Password">
                </asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>                
                <span style="font-weight: bold; color: #3399CC">Quyền:</span>
            </td>
            <td>
                <asp:DropDownList ID="drdRole" runat="server" Height="23px" Width="40%">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>                
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td  style="padding-left: 70px; padding-top: 20px">
                </td>
            <td>
                <asp:Button ID="btnAdd" runat="server" Text=":: Thêm ::" OnClick="btnAdd_Click" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnclear" runat="server" Text="::Reset::" 
                    OnClick="btnclear_Click" CausesValidation="false" />
            </td>
        </tr>
    </table>
    <br />
     <table  cellspacing="0" cellpadding="2" style="width:100%;" class="cssTable" border="0">
<tr>
		<td class="cssPageTitleBG">
		</td>
	</tr>
      <tr>
      <td>
      <asp:Label ID="lblMessage" Text="" Visible="false" runat="server" CssClass="lblMassage"></asp:Label></td>
      </tr>
      <tr>
      <td>
    <asp:GridView ID="grvGroupnews" runat="server" AutoGenerateColumns="False" CellPadding="4"
        BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" DataKeyNames="Id"
        ForeColor="Black" CssClass="GrvClass" AllowPaging="True" OnPageIndexChanging="event_paging"
        Width="100%">
        <Columns>
            <asp:TemplateField HeaderText="STT">
             <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
            <ItemTemplate><%# Container.DataItemIndex + 1 %>
            </ItemTemplate>
            <ItemStyle Width="5%" HorizontalAlign="Center"/>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Username">
            <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
            <ItemTemplate><%# Eval("Username")%></ItemTemplate>
            <ItemStyle HorizontalAlign="Center" Width="20%" />
        </asp:TemplateField>
             <asp:TemplateField HeaderText="Quyền">
            <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
            <ItemTemplate>  <%# ConvertRole(int.Parse(Eval("Role").ToString())) %></ItemTemplate>
            <ItemStyle HorizontalAlign="Center" Width="25%" />
        </asp:TemplateField>
             <asp:TemplateField HeaderText=" Trạng thái">
            <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
            <ItemTemplate><%# ConvertRoleToStatus(int.Parse(Eval("Role").ToString()))%></ItemTemplate>
            <ItemStyle HorizontalAlign="Center" Width="25%" />
        </asp:TemplateField>
         <asp:TemplateField HeaderText="Hành động">
            <HeaderStyle BackColor="#D4D4D4" ForeColor="Black" />
            <ItemTemplate>  <%# ConvertRoleToLock(int.Parse(Eval("Role").ToString()), int.Parse(Eval("Id").ToString()))%></ItemTemplate>
            <ItemStyle HorizontalAlign="Center" Width="25%" />
        </asp:TemplateField>
        </Columns>
        <RowStyle BackColor="#F7F7DE" />
        <FooterStyle BackColor="#CCCC99" />
        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    </td>
    </tr>
    <tr>
    <td>
    <p class="buttonClss">
        <asp:HiddenField ID="m_hdf_cate_id" runat="server" />
    </p> </td>
    </tr>
    </table> 
     
  <style type="text/css">
    .lblMassage
    {
        font-weight: bold;
        color: Red;
    }
</style>
  <link rel="stylesheet" href="../../5_style/general.css" type="text/css" media="screen" />  
    <link rel="stylesheet" href="../../5_style/csspagenews.css" type="text/css" media="screen" />
<script type="text/javascript" src="../../6_js/JScript_checkbox.js">
</script>

